# -*- coding: utf-8 -*-
# @Time    : 2018/8/27 10:15
# @Author  : zjj
# @Email   : 1933860854@qq.com
# @File    : filter.py
# @Software: PyCharm
import django_filters

from webuser.models import UserBase

class UserBaseFilter(django_filters.FilterSet):
    # 后端接口自定义过滤信息
    name = django_filters.CharFilter('name', lookup_expr='icontains')

    class Meta:
        model = UserBase
        # fields[]  必须存在  可为空  不然会报错
        fields = ['name', ]